package com.ldp.designpatterns.review.structure.decorator.demo2.concreteDecorator;

import com.ldp.designpatterns.review.structure.decorator.demo2.component.Battercake;
import com.ldp.designpatterns.review.structure.decorator.demo2.decorator.BattercakeDecorator;

/**
 * @ClassName EggDecorator
 * @Description TODO 第4步：4、具体装饰器（ConcreteDecorator）
 * @Author lindipei
 * @Date 2023/10/20 17:29
 */
public class EggDecorator extends BattercakeDecorator {
    public EggDecorator(Battercake battercake) {
        super(battercake);
    }

    @Override
    public String getMessage() {
        return super.getMessage() + " + 1个鸡蛋";
    }

    @Override
    public int getPrice() {
        return super.getPrice() + 2;
    }

    @Override
    public void addedFunction() {

    }
}
